package com.fzhucc.modules.subject.service.mapstruct;

import com.fzhucc.modules.subject.domain.dto.SubjectHighfieldsType3CreateDto;
import com.fzhucc.modules.subject.domain.dto.SubjectHighfieldsType3QueryDto;
import com.fzhucc.modules.subject.domain.entity.SubjectHighfieldsType3;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;

/**
* @website https://fzhucc.com
* @author yyg
* @since 2022-09-26 00:00:00
**/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public class SubjectHighfieldsType3Mapper {
    public SubjectHighfieldsType3CreateDto toCreateDto(SubjectHighfieldsType3 entity){
        if(entity == null){
            return null;
        }
        SubjectHighfieldsType3CreateDto dto = new SubjectHighfieldsType3CreateDto();
        dto.setId(entity.getId());
        dto.setHighfields3(entity.getHighfields3());
        dto.setName(entity.getName());
        dto.setHighfields2(entity.getHighfields2());
        return dto;
    }
    public SubjectHighfieldsType3QueryDto toQueryDto(SubjectHighfieldsType3 entity){
        if(entity == null){
            return null;
        }
        SubjectHighfieldsType3QueryDto dto = new SubjectHighfieldsType3QueryDto();
        dto.setId(entity.getId());
        dto.setHighfields3(entity.getHighfields3());
        dto.setName(entity.getName());
        dto.setHighfields2(entity.getHighfields2());
        return dto;
    }

    public SubjectHighfieldsType3 toEntity(SubjectHighfieldsType3CreateDto dto){
        if(dto == null){
            return null;
        }
        SubjectHighfieldsType3 entity = new SubjectHighfieldsType3();
        entity.setId(dto.getId());
        entity.setHighfields3(dto.getHighfields3());
        entity.setName(dto.getName());
        entity.setHighfields2(dto.getHighfields2());
        return entity;
    }

    public SubjectHighfieldsType3 toEntity(SubjectHighfieldsType3QueryDto dto){
        if(dto == null){
            return null;
        }
        SubjectHighfieldsType3 entity = new SubjectHighfieldsType3();
        entity.setId(dto.getId());
        entity.setHighfields3(dto.getHighfields3());
        entity.setName(dto.getName());
        entity.setHighfields2(dto.getHighfields2());
        return entity;
    }
}